<template>
    <div>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>字段显示设置</span>
            </div>
            <div>
                <el-table :data="fields" size="mini" @selection-change="handlerSelectionChange">
                    <el-table-column type="index" label="序号" :index="indexMethod"/>
                    <el-table-column label="字段">
                        <template slot-scope="scope">{{ scope.row.name }}</template>
                    </el-table-column>
                    <el-table-column label="字段可见">
                        <template slot-scope="scope">
                            <el-checkbox
                                :true-label="1"
                                :false-label="0"
                                v-model="scope.row.isShow"
                            ></el-checkbox>
                        </template>
                    </el-table-column>
                    <el-table-column label="学生可改">
                        <template slot-scope="scope">
                            <el-checkbox
                                :true-label="1"
                                :false-label="0"
                                v-model="scope.row.studentMdf"
                            ></el-checkbox>
                        </template>
                    </el-table-column>
                    <el-table-column label="学院可改">
                        <template slot-scope="scope">
                            <el-checkbox
                                :true-label="1"
                                :false-label="0"
                                v-model="scope.row.facultyMdf"
                            ></el-checkbox>
                        </template>
                    </el-table-column>
                    <el-table-column label="学校可改">
                        <template slot-scope="scope">
                            <el-checkbox
                                :true-label="1"
                                :false-label="0"
                                v-model="scope.row.schoolMdf"
                            ></el-checkbox>
                        </template>
                    </el-table-column>
                </el-table>
                <!-- <div class="edu-pagination">
                    <div class="float-right">
                        <el-pagination
                            :current-page="queryForm.pageNum_"
                            :page-sizes="[10, 20, 40, 100]"
                            :page-size="queryForm.pageSize_"
                            :total="totalCount"
                            layout="total, sizes, prev, pager, next, jumper"
                            style="float: right;margin:10px 60px 0 0;"
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                        />
                    </div>
                </div>-->
            </div>
        </el-card>
    </div>
</template>
<script>
export default {
    props: {
        typeId: {
            type: String,
            required: true
        },
        fields: {
            type: Array,
            required: true
        }
    },
    methods: {
        indexMethod(index) {
            return index + 1;
        }
    }
};
</script>
<style>
</style>
